|
Neural Network Softwareneural networks programming tool, back propagation neural networks (neural networks pattern recognition), Kohonen neural network (neural network classifier), neural network genetic algorithm. |
|
|
Cortex Artificial Neural Networks Softwarever.5.0 Tutorial. ContentsNeural Network Program and more (what is Cortex?) Using Neural Networks (Features) Installation of Cortex Neural Network Application Uninstallation of Cortex Neural Network Application Registration of Cortex Neural Network Application Cortex Neural Network Tutorial Other features: images and so on. Sample scripts
To some extent, Neural network trading is what Cortex was created for. It includes: Neural NetworksOn this site, you will find an example, Neural Network Forex Trading Tutorial, that gives you detailed, step by step instructions. Neural Network Genetic Algorithm ModuleGenetic computations, when applied to neural networks, result in a powerfull data analysis tool. Add here the scripting language, that gives you an ability to write your own genetic algorithms, and you will get amazing results... On this site, you will find an example, that teaches, step by step, using Neural Network Genetic Algorithm for FOREX trading. Kohonen Self Organizing MapsSOM (Self Organizing Maps, classification neural network) are now included as part of Cortex neural network software. With SOM you can perform network teaching and to use a resulting net for data classification. On this site, you will find an example, that teaches, step by step, how to use Kohonen Neural Network for FOREX trading. ScriptingA built-in scripting language, that allows you to perform routine tasks automatically. Loading and converting data, optimizations, creating charts, as well as web pages containing these charts, and much more can be created by scripts, with no interference from the user. ExtrasAdditional features, that include databases, image processing, HTML/XML based forms and data import-export. This tutorial illustrates the use of UI (non-scripting) features of Cortex. For the complete information on scripting language, see scripting tutorial and scripting reference guide.
Let's outline the steps that we need to take, to use the Neural Network as the data analysing tool (I assume that you are already familiar with an introduction to neural networks theory). The Cortex will help you to do these steps faster and with less frustration, something you may want to keep in mind while reading. 1. First of all, we need data, anything from stock quotes to the sound patterns for a speech recognition software. The only criteria is - the data must be sequential (a table with numbers in it's cells is a good example). 2.These data need to be fed to the artificial neural networks application
one row in a time. Let's say, we want to do stock trading. One row of
data is simply not enough! You need a HISTORY, not just a current OHLC
information. Can you predict the tomorrow's stock price based on
today's price? Not unless you have the "historical price" information
for at least couple of prior days. 3. We need to choose a Neural Network configuration - number of neurons, activation type and so on. The Cortex neural network software presents a simple visual interface, that allows to do just that. (Again, you can use scripting language to do it in automated way. When you only need one neural network, it does not make a lot of sense, but sometimes, you need to try many different combinations of input data, with different networks - automating this task is a real time saver). 4. What wedo next is training neural network. To do it, we run it against part of the data in the "backpropagation" mode, using
another part of the data to test the performance of the net. The first part of the data will be (in this tutorial) called a
learning data set, the second part is called a "testing" data set. As we doing it, a neural networks optimization occures.
5. After the neural networks optimization (training) is completed, we can use it on the "real" data. For example, we may teach it on the stock qoutes for the last year, and then we expect it to predict the tomorrow's price, based on the price for today, and couple of days of history. To do it we need to generate a lag file, and to run the data rows we want to analyze through the Neural Network. The resulting file will have the following columns: Columns for the input. What we present to the Neural Network.
Here is an example:
As was already mentioned, the Cortex Neural Network Application does just that - and much more (see Cortex Built-in Scripting Language). 6. Finally, after the Neural Network is created, we need to somehow call it from the trading software of our choice: TradeStation, MetaStocks, MetaTrader... In the article on Neural Network FOREX Trading you will find a working neural network trading system that is created, step by step, and then moved from Cortex to the trading platform, capable to place real trades with the real brocker.
Download the Cortex archive. Some programs that you can download from this site can work together. If you want (strongly recommended) this kind of functionality to be available, you should create a common folder, called (recommended) S_PROJECTS, and to unzip all software in this folder. The sub-folders will be created for you automatically during the unzip procedure. When specifying options in your Winzip software, make sure that all subdirectories (subfolders) are restored. Usually it is the default setting for the WinZip. Installation is complete.
Delete the folder containing the Cortex files.
Cortex is distributed as feature-limited shareware. If you choose to register the Cortex software, you will need to enter the password (provided in the e.mail that you will receive after the registration) into the registration prompt.
Run the Cortex.exe. From the main menu select File - New NN File. Click the "..." button to open the data/stocks/genz.txt file. One of the possible solutions is to use the Built-in scripting language to pre-process the file. As we are trying to create a network to PREDICT the future values for the line (represented by data in genz.txt), we need to provide the input in the form of HISTORICAL PATTERNS - not only today's data, but yesterdays, and so on. The reason we need it is simple. Can we predict the future value of the stock price by the current value ONLY? No. We need to know what the price was yesterday, and the day before yesterday - we need to know what is going on with this price. The "Adj. Close*" is now selected in the list boxes. We are about to generate what is called a lag file. The idea of the lag file is to represent today's data in the same table, side by side with the data for yesterday and so on. Press the "lag file" button. You will have the file with .lgg extention containing something like:
As you can see, the first value in Close-1 column was removed, and the entire column moved up. For the Close-2, TWO first values were removed and so on. Therefore, each line of this new file contains data for the current day AND data for nine previous days. Let's select the new inputs. Click on the "Select fields" again, and select "Adj. Close*-1", "Adj. Close*-2"... "Adj. Close*-9" as inputs and "Adj. Close*" as output. This way we will be using nine PREVIOUS days to predict the coming price.
Click on the "Network" tab.
As you can see, you can specify the number of layers, number of neurons in hidden layers (see Introduction to Neural Networks for details on what the elements of a Neural Net are), one of two activation functions (standard for almost any NN package), and stop criteria, if you want the learning process to stop automatically. For this particular task let's select 7 neurons in the hidden layer. Click on the "Processing" tab.
Here you can specify one of two ways of breaking the data to the "learning" and "testing" parts (see Introduction to Neural Networks for details). You can use first N records (patterns) as a "learning" material and the rest - as a "testing" data. Or you can randomly select N % of the data. The random selection does not work with the prediction - it is called cheating ;) But it works well when you are trying to do a line fitting. So for this example we will choose the "First N records" option. How do we know how many records we have in our .lgg file? We can open the file in a text editor and find out. Or we can click the button on the right from the data entry field. I got 1228 records, and I have decided to use 1000 of them for "learning", and the rest - for the "testing". The "adjust range" combo box is important if there is a chance for our "test" data to get out from the range where the "learning" data are. To compensate, we can extend the range. Let's leave it at 1.0 as in our case the last 228 records are not out of range of the first 1000. Click the "Learning" tab, select all check boxes and press Run. The Neural Network will begin the learning process. The number of epochs (how many times the entire data set was presented to the network), and the best (smallest) learning and testing errors will be displayed.
As the learning continues, the error (representing the difference between the actual output of the network and the desired output) is decreasing. When we decide that it is small enough (and we can always go back and continue the training) we click "Stop" and go to the "Apply" tab. The "Apply" tab is an exact copy of a "Input" tab except for the "Chart" and "Apply" buttons. The functionality is different, however.
Click the "..." and open the .LGG file. Select same fields you used as the inputs and outputs. When you press the "Apply" button, the file with the .apl extention is generated. It contains all data that the input contained, plus extra fields for the output, generated by the Neural Network. Finally, switch to the "Output" tab, click the "..." and open the .APL file.
Select the No (record number) as the input and Close and NN:Close as outputs - we are going to plot the Close and Predicted Close together on the same chart, to be able to compare them visually. Use the "Chart" button, to plot the desired output (Close) vs. the output, produced by the Neural Net. The following image is produced by the undertrained Neural Net. The approximation is not very poor (for a one-day prediction). If you continue training, you will get better results.
And more. As new features are introduced, new samples are added to the ZIP archive, so that you can see it in action. Also, there is a complete list available in Cortex Built-in Scripting Language Reference Guide. To get fully enabled version of the Cortex, you need to register. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
|
Please, provide us with some feedback!
It is a matter of life and death for us, but will only take 20 seconds for you. No personal info collected. Proceed... |
||
| NLP, Hypnosis, Power, Manipulation | Tai Chi, Chi Gun |
Neural Networks
Stock and FOREX trading: full cycle, steps-by-step. |
| Habits Management | Karate tutorial |
|
|
|
Back Pain Relief System | Calendar Creator |
| Building a small profitable site | Joints Gymnastics | Another Flow Charts Designer |
| Profitable web site in 9 days |
|
Flow charts for Presentations and Web |
|
|
Shareware Directory |
|
| Touch Typing: how fast can you learn it? | Web programming : Perl, XML | Stock and FOREX Trading |
| Home |